package com.xiaojie.feign.server;

import com.xiaojie.feign.dto.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName ParamContorller
 * @Description TODO
 * @Author wangye
 * @Date 2022/1/13
 **/
@RestController
@RequestMapping("/server/param")
public class ServerParamContorller {

    @RequestMapping("/test")
    public String test(String name) {
        return "success:" + name;
    }

    @RequestMapping("/test2")
    public User test2(String name) {
        return User.builder().name(name).build();
    }

    @RequestMapping("/test3")
    public String test3(User user) {
        return user.toString();
    }

}
